#ifndef __VERIFICATION_H__
#define __VERIFICATION_H__
typedef struct cmdShare_s{
    char id[512];
    char token[1024];
    char command[2048];
}cmdShare_t;

int cmdShareInit(cmdShare_t* pCmdShare,const char* id,const char* token,const char* command);
int generateId(const char* username,char* id);
int getusername(const char* id,char* username); //根据返回的id,获取username;
int getIdAndToken(const char* response,char* id,char* token); //登录和注册时根据服务端的返回结果,获取id和token
int tokenVerify(int sockfd,const char* id,const char* token,const char* command);   //进行token验证

int userRegister(int sockfd,cmdShare_t* pCmdShare);
int pwdAuth(int sockfd,cmdShare_t* pCmdShare);

#endif
